home *** CD-ROM | disk | FTP | other *** search
/ Champak 114 / Vol 114.iso / games / cheeky_c.swf / scripts / DefineSprite_96 / frame_5 / DoAction.as
Encoding:
Text File  |  2010-08-12  |  542 b   |  28 lines

  1. if(msg == "")
  2. {
  3.    gotoAndStop("waiting");
  4.    play();
  5. }
  6. else
  7. {
  8.    if(msg == "top10")
  9.    {
  10.       var i = 0;
  11.       while(i < 10)
  12.       {
  13.          var id = i + 1;
  14.          _root["name" + id + "_txt"] = this["n" + i];
  15.          _root["goals" + id + "_txt"] = this["s" + i];
  16.          _root["desc" + id + "_txt"] = this["c" + i] + ", Age " + this["a" + i];
  17.          i++;
  18.       }
  19.       _root.gotoAndStop("top10");
  20.    }
  21.    else
  22.    {
  23.       _root.msg_txt = msg;
  24.       _root.gotoAndStop("serverMsg");
  25.    }
  26.    gotoAndStop(1);
  27. }
  28.